<%@ page import="cn.myschool.severs.SubjectServer" %>
<%@ page import="cn.myschool.entity.Subject" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/7/1
  Time: 16:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%!
   String what=null;
%>
<html>
<head>
    <title>课程信息</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    String name = request.getParameter("name");
    String time = request.getParameter("time");
    String id = request.getParameter("gradeId");
    Subject sj = new Subject();
    sj.setSubjectname(name);
    sj.setClasshour(Integer.valueOf(time));
    sj.setGradeid(Integer.valueOf(id));
    int a = SubjectServer.ME.add2(sj);
    if (a>0){
        what="操作成功";
    }else {
        what="操作失败";
    }

%>
</body>
<p>
    结果：<%=what%>
</p>
<p>
    名称：<%=name%><br>学时：<%=time%><br>年级id：<%=id%>
</p>
</html>
